home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE11 / TIPTRIX / LISTING3.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1996-06-17  |  675 b   |  22 lines

  1. procedure TBag.SetFormPlace(AName: string; AForm: TForm);
  2. var s: string[99];
  3.     Place : TWindowPlacement;
  4. begin
  5.   Place.length :=SizeOf(TWindowPlacement);
  6.   if not GetWindowPlacement(AForm.Handle,@Place) then
  7.     exit;
  8.   with Place do begin
  9.     s := IntToStr(Flags);
  10.     s := AppendS(s,ShowCmd);
  11.     s := AppendS(s,ptMinPosition.X);
  12.     s := AppendS(s,ptMinPosition.Y);
  13.     s := AppendS(s,ptMaxPosition.X);
  14.     s := AppendS(s,ptMaxPosition.Y);
  15.     s := AppendS(s,rcNormalPosition.Left);
  16.     s := AppendS(s,rcNormalPosition.Top);
  17.     s := AppendS(s,rcNormalPosition.Right);
  18.     s := AppendS(s,rcNormalPosition.Bottom);
  19.   end;
  20.   SetString(AName,s);
  21. end;
  22.